#ifndef _GAME_MODE_BASE_H_
#define _GAME_MODE_BASE_H_

#include <OgreCamera.h>
#include <OgreEntity.h>
#include <OgreLogManager.h>
#include <OgreRoot.h>
#include <OgreViewport.h>
#include <OgreSceneManager.h>
#include <OgreRenderWindow.h>
#include <OgreConfigFile.h>

#include <OISEvents.h>
#include <OISInputManager.h>
#include <OISKeyboard.h>
#include <OISMouse.h>
#include <SdkTrays.h>
#include <SdkCameraMan.h>
#include "World.h"
using namespace Ogre;
class SceneEvnArgs
{
public:
	Ogre::Camera* mCamera;
	Ogre::Viewport* mViewport;
	Ogre::SceneManager* mSceneMgr;

	OIS::Mouse *mMouse;
	OIS::Keyboard *mKeyboard;

	OgreBites::SdkCameraMan* mCameraMan;
};

class Scene: public Ogre::FrameListener,  public OIS::KeyListener, public OIS::MouseListener
{
public:

	Scene(SceneEvnArgs evn);
	virtual ~Scene();

	// Ogre::FrameListener
	virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);
	// OIS::KeyListener
	virtual bool keyPressed( const OIS::KeyEvent &arg );
	virtual bool keyReleased( const OIS::KeyEvent &arg );
	// OIS::MouseListener
	virtual bool mouseMoved( const OIS::MouseEvent &arg );
	virtual bool mousePressed( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
	virtual bool mouseReleased( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
	virtual void Initialization();
	virtual void destroyScene(void);


protected:
	
	virtual void createCamera(void);
	virtual void createScene(void) = 0; // Override me!

	//virtual void setSkeyBox(bool enable,  
	//	const String& materialName,  
	//	Real distance,  
	//	uint8 renderQueue,  
	//	const Quaternion& orientation,  
	//	const String& groupName);




	Ogre::Root *mRoot;
	Ogre::Camera* mCamera;
	Ogre::Viewport* mViewport;
	Ogre::SceneManager* mSceneMgr;

	OIS::Mouse *mMouse;
	OIS::Keyboard *mKeyboard;

	// OgreBites
	OgreBites::SdkTrayManager* mTrayMgr;
	OgreBites::SdkCameraMan* mCameraMan;     // basic camera controller
	OgreBites::ParamsPanel* mDetailsPanel;   // sample details panel
	
	World *mWorld;

};



#endif